home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / fadecode / fade_c.c < prev    next >
C/C++ Source or Header  |  1994-08-19  |  1KB  |  58 lines

  1. #include <alloc.h>
  2.  
  3. #include "fade.h"
  4.  
  5.  
  6. void fade_out_screen(void far *pal)
  7. { int n;
  8.   for(n=0;n<32;++n)
  9.    fade_out_once(pal);
  10. }
  11.  
  12. void bright_out_screen(void far *pal)
  13. { int n;
  14.   for(n=0;n<32;++n)
  15.    bright_out_once(pal);
  16. }
  17.  
  18.  
  19. void fade_in_screen(void far *pal)
  20. { int n;
  21.   char far *buff;
  22.   buff=farcalloc(768*2,1);
  23.   for(n=0;n<32;++n)
  24.    fade_in_once(buff,pal);
  25.   farfree(buff);
  26. }
  27.  
  28. void bright_in_screen(void far *pal)
  29. {  int n;
  30.    char far *buff,*buff2;
  31.    buff=farmalloc(768*2);
  32.    buff2=farmalloc(768);
  33.    copyPal(pal,buff2);
  34.  
  35.    fill_pal(buff,63,63,63);  /* fills the palette array with white color */
  36.    sub_palette(buff,buff2);
  37.    for(n=0;n<63;++n)
  38.     fade_between_once(buff,buff2);
  39.    farfree(buff2);
  40.    farfree(buff);
  41. }
  42.  
  43.  
  44. void fade_between_screen(void far *pal,void far *paldest)
  45. {  int n;
  46.    char far *buff,*buff2;
  47.    buff=farmalloc(768*2);
  48.    buff2=farmalloc(768);
  49.    copyPal(paldest,buff2);
  50.    copyPal(pal,buff);
  51.    sub_palette(buff,buff2);
  52.    for(n=0;n<63;++n)
  53.     fade_between_once(buff,buff2);
  54.    farfree(buff2);
  55.    farfree(buff);
  56. }
  57.  
  58.